<div appBsModal #resPoolModal="bs-modal" aria-labelledby="resPoolModal" id="resPoolModal"
 class="modal fade visible" tabindex="-1" (onShown)="getResources()"
    role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form  #resPoolForm="ngForm" name="resPoolForm" (ngSubmit)="save()" novalidate autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>{{l("detail")}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row align-items-center">
                        <div class="col-12">
                            <div class="form-group">
                                <div class="input-group">
                                    <input [(ngModel)]="filterText" name="filterText" autoFocus class="form-control m-input" [placeholder]="l('name')" type="text">
                                    <span class="input-group-btn">
                                        <button (click)="getResources()" class="btn btn-primary" type="button">
                                            <i class="icon-sousuo-sousuo"></i>
                                        </button>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <!--<Primeng-Datatable-Start>-->
                        <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
                            <app-image-grid [imageList]="primengTableHelper.records" [(selection)]="resourceSelection" gridOwner="resource" mode="-1"
                                isSingleSelect="true"></app-image-grid>
                            <div class="primeng-paging-container">
                                <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage" #paginator (onPageChange)="getResources($event)" [totalRecords]="primengTableHelper.totalRecordsCount">
                                </p-paginator>
                                <span class="total-records-count">
                                    {{l('TotalRecordsCount', primengTableHelper.totalRecordsCount)}}
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" (click)="close()">{{l("Cancel")}}</button>
                    <button type="submit" class="btn btn-primary blue"  [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')">
                        <i class="fa fa-save"></i>
                        <span>{{l("Apply")}}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
